Skip to content

BUG: Skip packages that vanish between listing and cleanup - #199

Merged
larsoner merged 1 commit into
scientific-python:mainfrom
larsoner:fix-vanished-package
Nov 30, 2026
Merged

larsoner merged 1 commit into
scientific-python:mainfrom
larsoner:fix-vanished-package

Conversation

@larsoner

Copy link
Copy Markdown
Contributor

Follow-up to #198. Dispatched run https://github.com/scientific-python/upload-nightly-action/actions/runs/46473065329 removed the overdue versions as expected, then failed on test-package:

# package: test-package
jq: error (at <stdin>:1): Cannot iterate over null (null)
##[error]Process completed with exit code 5.

anaconda show still listed test-package, but ci.yml's cleanup had already deleted it, so api.anaconda.org/package/.../test-package returns {"error": "\"test-package\" could not be found"}. That jq failure was there before #198 too, but was ignored. Under -e it stops the loop, so every package sorting after it (uhi, uproot, xarray, zarr in that run) was skipped.

This uses .releases[]? so a package with no releases in the response has nothing to remove. Other failures, such as anaconda remove errors, still fail the run.

🤖 Generated with Claude Code

anaconda show can still list a package the API no longer has, such as
ci.yml's test-package right after its cleanup removes it. The API then
returns an error object, jq fails on .releases[], and since the step now
runs with -e (scientific-python#198) the whole cleanup stops there, skipping every package
that sorts after it. Treat a missing releases list as nothing to remove.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@larsoner

Copy link
Copy Markdown
Contributor Author

Let's see if this gets us to green... 🤞 🤞

@larsoner
larsoner merged commit 86b9279 into scientific-python:main Nov 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant